package py.com.alfa.escriba.web.services;

import java.util.List;

import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import py.com.alfa.escriba.exception.ServiceException;
import py.com.alfa.escriba.persistence.dto.VehiculosDTO;
import py.com.alfa.escriba.persistence.dto.VehiculosinfoDTO;
import py.com.alfa.escriba.web.interceptor.InvocationContext;

public interface VehiculosService {
  List<VehiculosDTO> listVehiculos(InvocationContext ic) throws ServiceException;
  List<VehiculosinfoDTO> listDatosVehiculosInfo(InvocationContext ic) throws ServiceException;
  List<VehiculosDTO>  buscarVehiculos(VehiculosDTO dto, InvocationContext ic) throws ServiceException;
  VehiculosDTO getVehiculos(Long id, InvocationContext ic) throws ServiceException;
  void deleteVehiculos(Long id, InvocationContext ic) throws ServiceException;
  @Transactional(value="transactionManager", rollbackFor={ServiceException.class},propagation=Propagation.REQUIRED)
  VehiculosDTO updateVehiculos(Long id, VehiculosDTO dto, InvocationContext ic) throws ServiceException;
  @Transactional(value="transactionManager", rollbackFor={ServiceException.class},propagation=Propagation.REQUIRED)
  VehiculosDTO createVehiculos(VehiculosDTO dto, InvocationContext ic) throws ServiceException;
}